package com.zzyl.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.zzyl.entity.NursingLevel;
import com.zzyl.mapper.NursingLevelMapper;
import com.zzyl.service.NursingLevelService;
import com.zzyl.vo.NursingLevelVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NursingLevelServiceImpl implements NursingLevelService {
    @Autowired
    private NursingLevelMapper nursingLevelMapper;

    @Override
    public List<NursingLevelVo> fianNursingLecelList() {
        List<NursingLevel> levels = nursingLevelMapper.seleteAll();
        //转换为vo对象
        List<NursingLevelVo> levelVos = BeanUtil.copyToList(levels, NursingLevelVo.class);
        return levelVos;
    }
}
